let questionList = new Vue({
    el:'#questionList',
    data:{
        questions:[]
    },
    methods:{
        loadMostHits:function () {
            $.ajax({
                url:"/api/v1/questions/my",
                type:'get',
                dataType:'json',
                success:function (json) {
                    let questions=[];
                    let statusText=['未回复','未解决','已解决'];
                    let statusClasses=['text-warning','text-info','text-success'];
                    for (let i=0;i<json.data.length;i++){
                        questions[i]=json.data[i];
                        questions[i].statusText=statusText[questions[i].status];
                        questions[i].statusClass=statusClasses[questions[i].status];
                    }
                    createQuestionMostHits.MostHits=questions;
                }
            });
        }
    },
    created: function () {
        this.loadMostHits();
    }
});